package com.csmz.enterprise.service.impl;

import java.util.List;
import com.csmz.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.csmz.enterprise.mapper.CsmzHbhPeopleListMapper;
import com.csmz.enterprise.domain.CsmzHbhPeopleList;
import com.csmz.enterprise.service.ICsmzHbhPeopleListService;

/**
 * 黑白灰名单Service业务层处理
 * 
 * @author TT
 * @date 2025-09-22
 */
@Service
public class CsmzHbhPeopleListServiceImpl implements ICsmzHbhPeopleListService 
{
    @Autowired
    private CsmzHbhPeopleListMapper csmzHbhPeopleListMapper;

    /**
     * 查询黑白灰名单
     * 
     * @param id 黑白灰名单主键
     * @return 黑白灰名单
     */
    @Override
    public CsmzHbhPeopleList selectCsmzHbhPeopleListById(Long id)
    {
        return csmzHbhPeopleListMapper.selectCsmzHbhPeopleListById(id);
    }

    /**
     * 查询黑白灰名单列表
     * 
     * @param csmzHbhPeopleList 黑白灰名单
     * @return 黑白灰名单
     */
    @Override
    public List<CsmzHbhPeopleList> selectCsmzHbhPeopleListList(CsmzHbhPeopleList csmzHbhPeopleList)
    {
        return csmzHbhPeopleListMapper.selectCsmzHbhPeopleListList(csmzHbhPeopleList);
    }

    /**
     * 新增黑白灰名单
     * 
     * @param csmzHbhPeopleList 黑白灰名单
     * @return 结果
     */
    @Override
    public int insertCsmzHbhPeopleList(CsmzHbhPeopleList csmzHbhPeopleList)
    {
        csmzHbhPeopleList.setCreateTime(DateUtils.getNowDate());
        return csmzHbhPeopleListMapper.insertCsmzHbhPeopleList(csmzHbhPeopleList);
    }

    /**
     * 修改黑白灰名单
     * 
     * @param csmzHbhPeopleList 黑白灰名单
     * @return 结果
     */
    @Override
    public int updateCsmzHbhPeopleList(CsmzHbhPeopleList csmzHbhPeopleList)
    {
        csmzHbhPeopleList.setUpdateTime(DateUtils.getNowDate());
        return csmzHbhPeopleListMapper.updateCsmzHbhPeopleList(csmzHbhPeopleList);
    }

    /**
     * 批量删除黑白灰名单
     * 
     * @param ids 需要删除的黑白灰名单主键
     * @return 结果
     */
    @Override
    public int deleteCsmzHbhPeopleListByIds(Long[] ids)
    {
        return csmzHbhPeopleListMapper.deleteCsmzHbhPeopleListByIds(ids);
    }

    /**
     * 删除黑白灰名单信息
     * 
     * @param id 黑白灰名单主键
     * @return 结果
     */
    @Override
    public int deleteCsmzHbhPeopleListById(Long id)
    {
        return csmzHbhPeopleListMapper.deleteCsmzHbhPeopleListById(id);
    }
}
